package com.accp.demo.service.base;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.accp.demo.mapper.base.IDepartmentMapper;
import com.accp.demo.pojo.base.Department;

//部门
@Service
public class DepartmentService {
	
	@Autowired
	private IDepartmentMapper departmentMapper;
	
	/**
	 * 新增部门
	 * @param pojo
	 */
	public void insert(Department pojo){
		departmentMapper.insert(pojo);
	};
	
	/**
	 * 修改部门 
	 * @param pojo
	 */
	public void update(Department pojo){
		departmentMapper.update(pojo);
	};
	
	/**
	 * 删除部门
	 * @param departNo
	 */
	public void delete(Integer departNo){
		departmentMapper.delete(departNo);
	};
	
	/**
	 * 查询部门
	 * @return
	 */
	public List<Department> query(){
	 	return departmentMapper.query();
	};
}
